As there are an increasing number of devices used to display content, there is a corresponding need to adjust that content to be displayed on those various devices. In some instances, web servers statically render images that have already been scaled for particular web pages. In these instances, the images are served to clients exactly as stored on the web servers. However, in other instances, web servers dynamically scale images when serving the images to clients. For example, in these instances, web servers may dynamically scale images at render time in response to particular requests from clients. These requests may be provided in the URL, an HTTP message, request headers, etc.
Client devices commonly request that web servers dynamically downscale images at render time. To do so, web servers commonly apply standard downscaling algorithms, which are designed to reduce the size of the image while persevering as much information as possible from the original image. These standard downscaling algorithms work well for most images. However, rescaling artifacts result from downscaling certain images. Such artifacts include moiré effects, contouring, skinning, and ringing. These artifacts cause the downscaled image to be of poorer quality than the original image. Special downscaling algorithms are available and may be applied to downscale these images without causing artifacts. However, special downscaling algorithms typically require more processing time than standard downscaling algorithms. This increased processing time results in longer page load times and added costs.
Accordingly, because standard downscaling algorithms work well for most images, it would be desirable to apply standard algorithms to most images and to only apply special downscaling algorithms as needed.
Same numbers are used throughout the disclosure and figures to reference like components and features, but such repetition of numbers is for purposes of simplicity of explanation and understanding, and should not be viewed as a limitation on the various embodiments.